// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作，更多内容详见uView对拦截器的介绍部分：
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const http = uni.$u.http
// 此处使用了传入的params参数，一切自定义即可
const getApiD = (data = {}, config) => http.get('/frontend/login/wechat', {params: data,...config});
const postApiD = (params = {}, config) => http.post('/frontend/yard/redeemRecord', params, config);
const loginAccount = (params = {}, config) => http.post('/frontend/user/login/account', params, config);
const loginPhone = (params = {}, config) => http.post('/frontend/user/login/phone', params, config);
const loginSendCode = (params = {}, config) => http.post('/frontend/user/login/send/code', params, config);
const loginWechat = (params = {}, config) => http.post('/frontend/user/login/wechat', params, config);
const register = (params = {}, config) => http.post('/frontend/user/register', params, config);
const startPay = (data = {}, config) => http.get('/system/config/configKey/start_pay', {params: data,...config});

export default {
	getApiD, //get示例接口
	postApiD, //post示例接口
	loginAccount,//账号密码登录
	loginPhone,//APP手机号-验证码登录
	loginSendCode,//APP发送验证码
	loginWechat,//微信授权登录
	register,//用户注册
	startPay,//潮鞋是否开启支付的开关接口get请求
	
}
